import request from '@/utils/request'

export function getClassifyListApi(data) {
  return request({
    url: '/commodityType/pageInfo',
    method: 'post',
    data
  })
}

export function saveClassifyApi(data) {
  return request({
    url: '/commodityType/save',
    method: 'post',
    data
  })
}

export function changeClassifyStateApi(data) {
  return request({
    url: '/commodityType/changeState',
    method: 'post',
    data
  })
}

export function deleteClassifyApi(data) {
  return request({
    url: '/commodityType/batchDelete',
    method: 'post',
    data
  })
}

export function getClassifyDetailApi(data) {
  return request({
    url: `/commodityType/detail/${data}`,
    method: 'post',
    data
  })
}

export function getGoodsListApi(data) {
  return request({
    url: '/commodity/pageInfo',
    method: 'post',
    data
  })
}

export function addSellGoodsApi(data) {
  return request({
    url: '/commodity/save',
    method: 'post',
    data
  })
}

export function sellGoodsStateChangeApi(data) {
  return request({
    url: '/commodity/changeState',
    method: 'post',
    data
  })
}

export function deleteSellGoodsApi(data) {
  return request({
    url: '/commodity/batchDelete',
    method: 'post',
    data
  })
}

export function getSellGoodsDetailApi(params) {
  return request({
    url: `/commodity/detail/${params.id}`,
    method: 'get'
  })
}

export function getRobPoolListApi(data) {
  return request({
    url: '/room/commodity/pageInfo',
    method: 'post',
    data
  })
}

export function getRobGoodsListApi(data) {
  return request({
    url: '/room/commodityList/pageInfo',
    method: 'post',
    data
  })
}
